def parse_device_check_absence(data, columns_lst):
    if data is None or "list" not in data:
        return None

    data_lst = data["list"]
    if not data_lst:
        data_lst = []

    # 真实要获取的字段
    columns_lst = ["sourceType", "type", "shift", "recordDate", "duration", "appealStatus", "createdAt"]
    res_table_columns = ["点位名称", "关联类型", "关联名称", "类型", "班组", "巡检日期", "巡检时间段", "申述状态","统计时间"]

    appealStatus_mapping = {
        1: "未申诉",
        2: "申述中",
        3: "申诉成功",
        4: "申诉失败",
        5: "申诉驳回"
    }

    res_table = []

    for row in data_lst:
        row_lst = []
        for column in columns_lst:
            v = row[column]
            if column == "sourceType":
                if v == 1:
                    row_lst.append(row["device"]["devicePoint"][0]["loc"])
                    row_lst.append("设备")
                    row_lst.append(row["device"]["name"])
                elif v == 2:
                    row_lst.append(row["area"]["devicePoint"]["loc"])
                    row_lst.append("区域")
                    row_lst.append(row["area"]["name"])
                else:
                    row_lst.append("")
                    row_lst.append(v)
                    row_lst.append("")

            elif column == "type":
                row_lst.append(f"{v}H")

            elif column == "appealStatus":
                if v in appealStatus_mapping:
                    v = appealStatus_mapping[v]
                row_lst.append(v)
            else:
                row_lst.append(v)
        res_table.append(row_lst)

    return {
        "res_table_title": "查询【运行缺卡】相关数据如下：",
        "res_table_columns": res_table_columns,
        "res_table": res_table
    }
